<h1> Referral </h1>

<ul class="row large-5">
  <li class='column'>
    <span class="large-7 column"><strong>Name:</strong></span>
    <%= @referral.name %>
  </li>
  <li class='column'>
    <span class="large-7 column"><strong>Email:</strong></span>
    <%= @referral.email %>
  </li>
  <li class='column'>
    <span class="large-7 column"><strong>Referring User:</strong></span>
    <%= @referral.referring_user.try(:name) %>
  </li>
  <li class='column'>
    <span class="large-7 column"><strong>Referral Program:</strong></span>
    <%= @referral.referral_program.name %>
  </li>
  <li class='column'>
    <span class="large-7 column"><strong>Referral User:</strong></span>
    <%= @referral.referral_user.try(:name) || '-- Not signed up --' %>
  </li>
  <li class='column'>
    <span class="large-7 column"><strong>Referral Type:</strong></span>
    <%= @referral.referral_type.try(:name) %>
  </li>
  <li class='column'>
    <span class="large-7 column"><strong>Sent At:</strong></span>
    <%= @referral.sent_at %>
  </li>
  <li class='column'>
    <span class="large-7 column"><strong>Registered At:</strong></span>
    <%= @referral.registered_at %>
  </li>
  <li class='column'>
    <span class="large-7 column"><strong>Purchased At:</strong></span>
    <%= @referral.purchased_at %>
  </li>
  <li class='column'>
    <span class="large-7 column"><strong>Applied:</strong></span>
    <%= @referral.applied %>
  </li>

</ul>
<p>
  <%#= link_to "Edit", edit_admin_user_datas_referral_path(@referral), :class => 'button' %>
  <%= link_to "Destroy", [:admin, :user_datas, @referral], data: { confirm: "Are you sure?" }, method: :delete, class: 'button alert' %>
  &nbsp;
  <%= link_to "View All", admin_user_datas_referrals_path, class: 'button' %>
</p>
